<!DOCTYPE html>
<style>
#perspective {
  animation: anim 1s infinite;
  height: 150px;
  width: 150px;
  margin: 50px;
  padding: 10px;
}
@keyframes anim {
  0% { perspective: 150px; }
  100% { perspective: 150px; }
}
#transform {
  width: 150px;
  height: 150px;
  background: blue;
  transform: rotateY(45deg);
}
</style>
<div id="perspective">
  <div id="transform">
  </div>
</div>
